package com.yulongtian.interviewWorks;

import java.util.ArrayList;
import java.util.List;

/**
 * @author YulongTian
 * @date 2022/8/23 - 13:57
 */
public class Test01 {
    public static void main(String[] args) {
        Integer a = 1;
        Integer b = 2;
        Integer c = null;
        Boolean flag = false;
// a*b的结果是int类型，那么c会强制拆箱成int类型，抛出NPE异常
        Integer result = (flag ? a * b : c);
        System.out.println(result);
    }


}
